package com.estar.integaration.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.estar.integaration.Mapper.ChildAcodeMapper;
import com.estar.integaration.Service.IChildAcodeService;
import com.estar.integaration.entity.ChildAcode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author YJL
 * @since 2021-11-18
 */
@Service
public class ChildAcodeServiceImpl extends ServiceImpl<ChildAcodeMapper, ChildAcode> implements IChildAcodeService {

  @Autowired
  ChildAcodeMapper childAcodeMapper;

  @Override
  public List<ChildAcode> getChildACodeList(QueryWrapper queryWrapper) {
    return childAcodeMapper.selectList(queryWrapper);
  }

  @Override
  public List<ChildAcode> getChildACodeByProductId(String productId) {
    QueryWrapper queryWrapper = new QueryWrapper();
    queryWrapper.eq("product_id",productId);
    List<ChildAcode> childAcodeList = childAcodeMapper.selectList(queryWrapper);
    return childAcodeList;
  }

}
